package accountBank;
import java.io.*;
import java.util.*;
import java.lang.*;

public class Account implements Lockable {
	private static long SoTK;
	private static String TenTK;
	private static double SoTien;
	final static float LaiSuat = (float) 0.02;
	public Account(){


	}
	public Account(long SoTK,String TenTK,double SoTien){
		this.SoTK=SoTK;
		this.TenTK=TenTK;
		this.SoTien=SoTien;

	}
	// get, set SoTK
	public long getSoTK(){

		return SoTK;
	}
	public void setSoTK(long SoTK){

		this.SoTK = SoTK;
	}

	//get,set TenTK
	public long getTenTK(){

		return SoTK;
	}
	public void setTenTK(String TenTK){

		this.TenTK = TenTK;
	}
	//get,set SoTien
	public double getSoTien()
	{

		return SoTien;
	}
	public void setSoTien(double SoTien)
	{
		this.SoTien=SoTien;
	}

	//
	public String toString() 
	{ 
		return "So Tai Khoan: "+this.SoTK+"\nTen Tai Khoan: "+this.TenTK+"\nSo Tien:"+this.SoTien; 
	} 
	// Xay dung Constructor 2 doi so: So TK,TEnTK, So Tien mac dinh la 100
	public Account(long SoTK, String TenTK)
	{
		this.SoTK=SoTK;
		this.TenTK=TenTK;
		this.SoTien=100;

	}
	//Phuong thuc nap tien
	public static double NapTien()
	{
		System.out.println("Moi Nhap So Tien Ban Muon Nap");
		Scanner s1 = new Scanner("");
		double SoTienNap = s1.nextInt();

		if(SoTienNap < 0)
			System.out.println("So Tien Nap Vao Phai Lon Hon 0");
		else
			System.out.println("So Tien Ban Muon Nap:");
		SoTien=SoTien+SoTienNap;	
		return SoTien;

	}
	// Phuong THuc Rut Tien
	public static double RutTien(){
		System.out.println("Nhap So Tien Muon Rut");
		Scanner s = new Scanner("");
		double SoTienRut = s.nextInt();
		if(SoTienRut < 100000)
		{
			System.out.println("So Tien Rut Toi Tieu la 100000");
			SoTienRut = s.nextInt();
		}
		SoTien=SoTien-SoTienRut;
		return SoTien;
	}
	// Phuong Thuc Chuyen Tien

	public static void main(String[] args) throws Exception {
		double SoTienNap = 0;
		Account a = new Account(615105015,"Nguyen Ha Giang",100000);
		System.out.println(a);	
		RutTien();


	}


}

